from typing import Optional

from app.models.TSModel import TSModel


class UserInfo(TSModel):

    @staticmethod
    def generate_rowkey(open_id: str) -> str:
        return open_id

    def get_row_key(self) -> str:
        return self.generate_rowkey(self.open_id)

    __INSTANCE_NAME__: bytes = "flow_guardian".encode('utf-8')
    __TABLE_NAME__: bytes = "user_info".encode('utf-8')

    open_id: str
    name: Optional[str]
    phone_number: str
